<?php

namespace App\Http\Controllers\Api;

use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ReleaseController extends Controller
{
    public function server()
    {
        return response([
            [
                'name' => '操作系统',
                'value' => PHP_OS
            ],
            [
                'name' => 'PHP版本',
                'value' => PHP_VERSION
            ],
            [
                'name' => '运行环境',
                'value' => $_SERVER ['SERVER_SOFTWARE']
            ],
            [
                'name' => '发行版本',
                'value' => 'v1.0'
            ],
            [
                'name' => '北京时间',
                'value' => Carbon::now()->format('Y-m-d H:i:s')
            ],
            [
                'name' => '网站域名',
                'value' => $_SERVER['HTTP_HOST']
            ],
            [
                'name' => '服务器IP',
                'value' => $_SERVER['SERVER_ADDR']
            ],
            [
                'name' => '上传限制',
                'value' => get_cfg_var("upload_max_filesize") ? get_cfg_var("upload_max_filesize") : "不允许上传附件"
            ],
            [
                'name' => '温馨提示',
                'value' => '本系统不支持旧版本浏览器, 如若显示异常，请升级您的浏览器'
            ]
        ]);
    }
}
